home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7009 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  36 lines

  1. Path: logica.co.uk!usenet
  2. From: Kevin Thomas <thomask@logica.com>
  3. Newsgroups: comp.lang.c++,comp.os.ms-windows.programmer.misc
  4. Subject: Exporting static data from 32-bit Windows DLLs
  5. Date: Wed, 21 Feb 1996 13:21:18 +0000
  6. Organization: Logica UK Ltd.
  7. Message-ID: <312B1C4E.4FF1@logica.com>
  8. NNTP-Posting-Host: 158.234.77.222
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=iso-8859-1
  11. Content-Transfer-Encoding: 8bit
  12. X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
  13.  
  14. Hi,
  15.  
  16. IÆm trying to use Visual C++ (v4.0) to develop some 32-bit Windows DLLs. 
  17. The DLLs must export class methods and static data members.
  18.  
  19. IÆve successfully exported methods, but have a problem with exporting 
  20. the static data. If I attempt to export the data with 
  21. __declspec(dllexport) on the class or by providing an entry in the 
  22. æEXPORTSÆ section of the .DEF file with the æDATAÆ keyword (as suggested 
  23. by the documentation) then I get unresolved external errors attempting 
  24. to link to it.
  25.  
  26. If I provide an entry in the æEXPORTSÆ section of the .DEF file without 
  27. the æDATAÆ keyword then the client program links to the DLL 
  28. successfully, but at run-time the static data points at the wrong memory 
  29. (thus making it full of garbage).
  30.  
  31. Any ideas, anyone?
  32.  
  33. Your help would be appreciated.
  34.  
  35. Kevin Thomas.
  36.